<?php

/**
 * Created by PhpStorm.
 * User: luanpeng
 * Date: 2017/2/7
 * Time: 18:25
 */
namespace app\index\validate;

class UserPublic extends Base
{
    protected $rule =   [
        'phone'  => 'require|phone',
        'password' => 'require|min:6',
        'code'=>'require|length:6',
    ];

    protected $message  =   [
        'phone.require' => '手机号码必须填写',
        'phone.phone'     => '手机号码格式必须正确',
        'password.require'  => '密码必须填写',
        'password.min'        => '密码长度必须大于等于6位',
        'code.require'  => '验证码必须填写',
        'code.length'        => '验证码的长度必须是6位',
    ];

    protected $scene = [
        'login'  =>  ['phone','password'],
        'reUser'  =>  ['phone','password','code'],
        'codePhone' => ['phone','code']
    ];

}